<ion-view view-title="我的订单">
	<ion-content class="">
	
		<tab-slide-box tab="0">
	    	<div class="tsb-icons">
	    		<div class="tsb-ic-wrp">
					<ion-scroll direction="x" class="tsb-hscroll">
					<a href="javascript:;" >全部({{orders.length}})</a>
					<a href="javascript:;" >待发货({{unSendOrders.length}})</a>
					<a href="javascript:;" >待收货({{unReceiveOrders.length}})</a>
					<a href="javascript:;" >已收货({{receivedOrders.length}})</a>
					</ion-scroll>
				</div>
	    	</div>
	        <ion-slide-box show-pager="false" on-slide-changed="slideHasChanged($index)">
	            <ion-slide>
	            	<ion-scroll style="height:100%">
	            		<ion-refresher pulling-text="松手刷新" on-refresh="doRefresh()"></ion-refresher>
	            		<div class="card" ng-repeat="order in orders" style="margin: 8px 5px;">
							<div class="item item-divider " ng-switch="{{order.orderStatus}}">
						    	<span class="item-note icon-right assertive " style="padding:5px 20px 5px 0;"  ng-switch-when="1">{{order.orderStatus | orderStatusNameFilter}}</span>
						    	<span class="item-note icon-right energized " style="padding:5px 20px 5px 0;"  ng-switch-when="2">{{order.orderStatus | orderStatusNameFilter}}</span>
						    	<span class="item-note icon-right positive " style="padding:5px 20px 5px 0;"  ng-switch-when="3">{{order.orderStatus | orderStatusNameFilter}}</span>
						    	<span class="item-note icon-right balanced " style="padding:5px 20px 5px 0;"  ng-switch-when="4">{{order.orderStatus | orderStatusNameFilter}}</span>
						    	<span class="item-note icon-right assertive " style="padding:5px 20px 5px 0;"  ng-switch-default>{{order.orderStatus | orderStatusNameFilter}}</span>
							</div>
							<div class="item item-text-wrap">
						     	<a class="order-item item item-thumbnail-left " href="#/tab/OrderGoodsDetail/{{goodsDetail.goodsId}}" ng-repeat="goodsDetail in order.goodsList">
							      <img ng-src ="/{{wxstore.ctx}}/static-content?contentPath={{goodsDetail.goodsImageUrl}}" >
							      <h2>{{goodsDetail.goodsName}}</h2>
							      <p>{{goodsDetail.goodsDesc}}</p>
							      <p>￥{{goodsDetail.realPrice}} x {{goodsDetail.goodsNumber}}</p>
							    </a>
							</div>
							<div class="item item-divider" style="background-color:#ffffff">
						   		<p style="padding:5px 0 5px 10px;font-size:10px;float:right"> 合计：￥{{order.realMoney}} （含运费￥0.00）</p>
						    </div>
							<div class="item item-divider tabs tabs-secondary" style="padding:10px 0px 0px 0px;background-color:#eee" ng-if="order.orderStatus == 1">
								<a class="tab-item" href="#"></a>
								<a class="tab-item" href="#"></a>
							    <a class="tab-item" href="#">
							    	<button class="button button-small button-outline button-assertive" ng-click="changeOrderStatus(order,5)">&nbsp;&nbsp;取消订单&nbsp;&nbsp;</button>
							    </a>
						    </div>
						    <div class="item item-divider tabs tabs-secondary" style="padding:10px 0px 0px 0px;background-color:#eee" ng-if="order.orderStatus == 3" >
						    	<a class="tab-item" href="#"></a>
								<a class="tab-item" href="#"></a>
							    <a class="tab-item" href="#">
							    	<button class="button button-small button-outline button-positive" ng-click="changeOrderStatus(order,4)">&nbsp;&nbsp;&nbsp;&nbsp;确认收货&nbsp;&nbsp;&nbsp;&nbsp;</button>
							    </a>
						    </div>
						</div>
						
						<!-- 没有订单提示 -->
						<div class="list card" ng-if="orders.length == 0">
						    <div class="item item-body">
							    <h2> 您还没有相关的订单 </h2>
							    <p>可以去看看有哪些想买的</p>
							    <p> <a class="button button-full button-balanced" href="#/tab/Store"> 逛商城，狂欢购 </a> </p>
						    </div>
						</div>
						<br/>
						<br/>
						<br/>
	                </ion-scroll>
	            </ion-slide>
	            <ion-slide>
	           	 	<ion-scroll style="height:100%">
		                <ion-refresher pulling-text="松手刷新" on-refresh="doRefresh()"></ion-refresher>
		                 <!-- 待发货 -->
	            		<div class="card" ng-repeat="order in unSendOrders" style="margin: 8px 5px;">
							<div class="item item-divider ">
						    	<span class="item-note icon-right energized " style="padding:5px 20px 5px 0;">{{order.orderStatus | orderStatusNameFilter}}</span>
							</div>
							<div class="item item-text-wrap">
						     	<a class="order-item item item-thumbnail-left " href="#/tab/OrderGoodsDetail/{{goodsDetail.goodsId}}" ng-repeat="goodsDetail in order.goodsList">
							      <img ng-src ="/{{wxstore.ctx}}/static-content?contentPath={{goodsDetail.goodsImageUrl}}" >
							      <h2>{{goodsDetail.goodsName}}</h2>
							      <p>{{goodsDetail.goodsDesc}}</p>
							      <p>￥{{goodsDetail.realPrice}}  x {{goodsDetail.goodsNumber}}</p>
							    </a>
							</div>
							<div class="item item-divider" style="background-color:#ffffff">
						   		<p style="padding:5px 0 5px 10px;font-size:10px;float:right"> 合计：￥{{order.realMoney}} （含运费￥0.00）</p>
						    </div>
						</div>
						
						<!-- 没有订单提示 -->
						<div class="list card" ng-if="unSendOrders.length == 0">
						    <div class="item item-body">
							    <h2> 您还没有相关的订单 </h2>
							    <p>可以去看看有哪些想买的</p>
							    <p> <a class="button button-full button-balanced" href="#/tab/Store"> 逛商城，狂欢购 </a> </p>
						    </div>
						</div>
						<br/>
						<br/>
						<br/>
	                </ion-scroll>
	            </ion-slide>
				<ion-slide>
					<ion-scroll style="height:100%">
		                <ion-refresher pulling-text="松手刷新" on-refresh="doRefresh()"></ion-refresher>
		                <!-- 待收货 -->
	            		<div class="card" ng-repeat="order in unReceiveOrders" style="margin: 8px 5px;">
							<div class="item item-divider ">
						    	<span class="item-note icon-right positive " style="padding:5px 20px 5px 0;">{{order.orderStatus | orderStatusNameFilter}}</span>
							</div>
							<div class="item item-text-wrap">
						     	<a class="order-item item item-thumbnail-left " href="#/tab/OrderGoodsDetail/{{goodsDetail.goodsId}}" ng-repeat="goodsDetail in order.goodsList">
							      <img ng-src ="/{{wxstore.ctx}}/static-content?contentPath={{goodsDetail.goodsImageUrl}}" >
							      <h2>{{goodsDetail.goodsName}}</h2>
							      <p>{{goodsDetail.goodsDesc}}</p>
							      <p>￥{{goodsDetail.realPrice}}  x {{goodsDetail.goodsNumber}}</p>
							    </a>
							</div>
							<div class="item item-divider" style="background-color:#ffffff">
						   		<p style="padding:5px 0 5px 10px;font-size:10px;float:right"> 合计：￥{{order.realMoney}} （含运费￥0.00）</p>
						    </div>
							<div class="item item-divider" style="background-color:#ffffff">
								    <a class="tab-item" href="#">
								    	<button class="button button-small button-outline button-positive" ng-click="changeOrderStatus(order,4)">&nbsp;&nbsp;&nbsp;&nbsp;确认收货&nbsp;&nbsp;&nbsp;&nbsp;</button>
								    </a>
						    </div>
						</div>
						
						<!-- 没有订单提示 -->
						<div class="list card" ng-if="unReceiveOrders.length == 0">
						    <div class="item item-body">
							    <h2> 您还没有相关的订单 </h2>
							    <p>可以去看看有哪些想买的</p>
							    <p> <a class="button button-full button-balanced" href="#/tab/Store"> 逛商城，狂欢购 </a> </p>
						    </div>
						</div>
						<br/>
						<br/>
						<br/>
	                </ion-scroll>
	            </ion-slide>
	            <ion-slide>
	            	<ion-scroll style="height:100%">
		                <ion-refresher pulling-text="松手刷新" on-refresh="doRefresh()"></ion-refresher>
		                <!-- 已收货 -->
	            		<div class="card" ng-repeat="order in receivedOrders" style="margin: 8px 5px;">
							<div class="item item-divider ">
						    	<span class="item-note icon-right balanced " style="padding:5px 20px 5px 0;">{{order.orderStatus | orderStatusNameFilter}}</span>
							</div>
							<div class="item item-text-wrap">
						     	<a class="order-item item item-thumbnail-left " href="#/tab/OrderGoodsDetail/{{goodsDetail.goodsId}}" ng-repeat="goodsDetail in order.goodsList">
							      <img ng-src ="/{{wxstore.ctx}}/static-content?contentPath={{goodsDetail.goodsImageUrl}}" >
							      <h2>{{goodsDetail.goodsName}}</h2>
							      <p>{{goodsDetail.goodsDesc}}</p>
							      <p>￥{{goodsDetail.realPrice}}  x {{goodsDetail.goodsNumber}}</p>
							    </a>
							</div>
							<div class="item item-divider" style="background-color:#ffffff">
						   		<p style="padding:5px 0 5px 10px;font-size:10px;float:right"> 合计：￥{{order.realMoney}} （含运费￥0.00）</p>
						    </div>
						</div>
						
						<!-- 没有订单提示 -->
						<div class="list card" ng-if="receivedOrders.length == 0">
						    <div class="item item-body">
							    <h2> 您还没有相关的订单 </h2>
							    <p>可以去看看有哪些想买的</p>
							    <p> <a class="button button-full button-balanced" href="#/tab/Store"> 逛商城，狂欢购 </a> </p>
						    </div>
						</div>
						<br/>
						<br/>
						<br/>
	                </ion-scroll>
	            </ion-slide>
	        </ion-slide-box>
    	</tab-slide-box>
	</ion-content>
</ion-view>